let connection = require('./connection');

const query = function (sql) {
  return new Promise((resolve, reject) => {
    connection.query(sql, (err, data) => {
      if (err) {
        reject(err);
        return;
      }
      resolve(data);
    });
  })
};


module.exports = {
  query
};

